package com.my.chapter10;

public class practice11 {
    public static void main(String[] args) {
        Outer11 o =new Outer11();
        C c = o.getInner();
        c.display();
        //Outer11.Inner i = (Outer11.Inner)c;//无法向下转型
    }
}

interface C{
    void display();
}

class Outer11{
    private class Inner implements C{

        @Override
        public void display() {
            System.out.println("Inner.display()");
        }
    }

    C getInner(){
        return new Inner();
    }
}

